#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int fac(int x)
{
	if(x <= 1)
	{
		return 1;
	}
	return x * fac(x - 1);
}

int main()
{
	int x;
	scanf("%d",&x);
	int ret = fac(x);
	printf("%d\n",ret);
	return 0;
}